package com.example.librarymanagement.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.librarymanagement.dto.periodical.PeriodicalListDto;
import com.example.librarymanagement.entity.Periodical;
import com.example.librarymanagement.vo.PeriodicalVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author zjia
 */
@Repository
public interface PeriodicalsMapper extends BaseMapper<Periodical> {
    /**
     * 分页查询（即dto对象中的name为空），或根据期刊名模糊查询
     * @param page 分页对象
     * @param periodicalListDto PeriodicalListDto对象
     * @return PeriodicalVo分页对象
     */
    IPage<PeriodicalVo> getPeriodicalsList(IPage<PeriodicalVo> page, @Param("search") PeriodicalListDto periodicalListDto);
}
